﻿using System;
using System.Collections.Generic;
using System.Text;

using Bpms.Data;
using Bpms.Entity;

namespace Bpms.BpmsFacade
{
    /// <summary>
    /// 用户接口实现
    /// </summary>
    public class User : IUserFacade
    {
        private IDataProvider Provider = DatabaseProvider.GetInstance();

        public bool InsertUser(UserInfo user)
        {
            return Provider.InsertUser(user);
        }

        public bool UpdateUser(UserInfo user)
        {
            return Provider.UpdateUser(user);
        }

        public bool DeleteUser(int userId)
        {
            return Provider.DeleteUser(userId);
        }

        public bool InsertOrganization(OrganizationInfo organization)
        {
            return Provider.InsertOrganization(organization);
        }

        public bool UpdateOrganization(OrganizationInfo organization)
        {
            return Provider.UpdateOrganization(organization);
        }

        public bool DeleteOrganization(int organizationId)
        {
            return Provider.DeleteOrganization(organizationId);
        }

        public bool InsertJobTitle(JobTitleInfo jobTitle)
        {
            return Provider.InsertJobTitle(jobTitle);
        }

        public bool UpdateJobTitle(JobTitleInfo jobTitle)
        {
            return Provider.UpdateJobTitle(jobTitle);
        }

        public bool DeleteJobTitle(int jobTitleId)
        {

            return Provider.DeleteJobTitle(jobTitleId);
        }
    }
}
